import { axios } from '~/plugins/axios';

// 获取新闻动态列表
export const getNewsList = (params?: any) => axios({
  method: 'get',
  url: '/dynamiNews/list',
  params,
}) as Promise<any>;

// 获取我的新闻动态列表
export const getMyNewsList = (params?: any) => axios({
  method: 'get',
  url: '/dynamiNews/myList',
  params,
}) as Promise<any>;

// 获取新闻审查列表
export const getAuditList = (params?: any) => axios({
  method: 'get',
  url: '/dynamiNews/exmainList',
  params,
}) as Promise<any>;

// 删除新闻
export const handleNewsDelete = (params?: any) => axios({
  method: 'delete',
  url: `/dynamiNews/delete?id=${params as string}`,
}) as Promise<any>;

// 新闻审核
export const handleAudit = (params?: any) => axios({
  method: 'post',
  url: '/dynamiNews/exmainNews',
  data: params,
}) as Promise<any>;
